﻿@model IEnumerable<SGC_CarteraClientes.Models.CA_PROSPECTO>

@{
    ViewBag.Title = "Index";
}

<h2>Registro de Prospectos</h2>
@if (TempData["message"] != null && TempData["message"].ToString().Trim()!="")
{
@Html.Raw(TempData["message"].ToString())
//@TempData["message"] = null;
} 
<hr />
<p>
    @Html.ActionLink("Nuevo Prospecto", "Create")
                @Html.ActionLink("Volver", "../")

</p>
<table class="tblSort">
    <thead>
    <tr>
        <th>
            Nro.Prospecto
        </th>
        <th>
           Ap.Paterno
        </th>
        <th>
            Ap.Materno
        </th>
        <th>
            Nombres
        </th>
        <!-- 
        <th>
            @Html.DisplayNameFor(model => model.PROSP_TELF)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PROSP_DIRE)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PROSP_MAIL)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PROSP_SUEL)
        </th>
            -->
        <th>
           Estado
        </th>
        <th>
            N.Documento
        </th>
        <th>
           F.Registro
        </th>
        <th></th>
    </tr>
        </thead>
    <tbody>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_ID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_APPAT)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_APMAT)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_NOMS)
        </td>
        <!-- 
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_TELF)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_DIRE)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_MAIL)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_SUEL)
        </td>
            -->
         <td align="center">
            @if (item.PROSP_STS == 1) { 
              <img src="/Images/active.png"  width="20px" />   
            }
            else {
              <img src="/Images/inactive.png"  width="20px" />   
            }
          @* @Html.DisplayFor(modelItem => item.PARAM_ESTADO) *@
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PROSP_NDOC)
        </td>
        <td>            
            @item.PROSP_FREG.Value.ToShortDateString()
        </td>
        <td>
            @Html.ActionLink("Modificar", "Edit", new { id=item.PROSP_ID.Trim() }) |
            @Html.ActionLink("Ver", "Details", new { id=item.PROSP_ID.Trim() }) |
            @Html.ActionLink("Eliminar", "Delete", new { id=item.PROSP_ID.Trim() })
        </td>
    </tr>
}
        </tbody>    
</table>
<hr />
<table border="1" rules="all">
    <caption><strong>Leyenda</strong></caption>
    <tr>
        <td align="center"><img src="/Images/active.png"  width="15px" />  </td><td>Activo</td>
    </tr>
     <tr>
        <td align="center"><img src="/Images/inactive.png"  width="15px" />  </td><td>Inactivo</td>
    </tr>
</table>
